import React, { memo, useEffect, useState } from "react";
import { GetGoodsList } from "@/utils/goods";
import { useHistory } from "react-router-dom";
import Goods from "../cpns/goods";
import { WaitingForReceiptWrapper } from "./style";
export default memo(function WaitingForReceipt() {
  const [list, setlist] = useState([]);
  const history = useHistory();

  useEffect(() => {
    GetGoodsList(history, setlist,2);
  }, []);

  useEffect(() => {
    console.log(list);
  }, [list]);
  return (
    <WaitingForReceiptWrapper>
      <Goods goodsList={list}></Goods>
    </WaitingForReceiptWrapper>
  );
});
